home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / gnu / fpu881 / src6.zoo / sign.c < prev    next >
Text File  |  1991-09-24  |  205b  |  19 lines

  1. double sign (x, y)
  2. double x;
  3. double y;
  4. {
  5.     if (x > 0.0) {
  6.     if (y > 0.0) {
  7.         return(x);
  8.     } else {
  9.         return(-x);
  10.     }
  11.     } else {
  12.     if (y < 0.0) {
  13.         return(x);
  14.     } else {
  15.         return(-x);
  16.     }
  17.     }
  18. }
  19.